import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout } from '#/layouts';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'lets-icons:chemistry',
      keepAlive: true,
      order: 1000,
      title: $t('apps.msds.title'),
      // hideChildrenInMenu: true,
    },
    name: 'MSDS',
    path: '/msds',
    children: [
      {
        name: 'ListPage',
        path: '/msds/list',
        component: () => import('#/views/msds/index.vue'),
        meta: {
          icon: 'carbon:data-view',
          keepAlive: true,
          title: $t('apps.msds.list'),
        },
      },
      {
        name: 'chemPage',
        path: '/msds/chemistry',
        component: () => import('#/views/msds/chem.vue'),
        meta: {
          icon: 'simple-line-icons:chemistry',
          keepAlive: true,
          title: $t('apps.msds.chemistry'),
          authority: ['super'],
        },
      },
    ],
  },
];

export default routes;
